package com.indexingsystem.boss.entity;

import java.io.Serializable;
import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;

public class RoleGroups implements Serializable {

	/**
	 * 
	 */
	private static final long	serialVersionUID	= 1L;

	private String				roleGroupId;

	private String				roleGroupName;

	private String				description;

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private Date				createDate;

	private String				createUserId;

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private Date				lastUpdatedDate;

	private String				lastUpdatedUserId;

	public String getRoleGroupId() {
		return roleGroupId;
	}

	public void setRoleGroupId(String roleGroupId) {
		this.roleGroupId = roleGroupId == null ? null : roleGroupId.trim();
	}

	public String getRoleGroupName() {
		return roleGroupName;
	}

	public void setRoleGroupName(String roleGroupName) {
		this.roleGroupName = roleGroupName == null ? null : roleGroupName.trim();
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description == null ? null : description.trim();
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(String createUserId) {
		this.createUserId = createUserId == null ? null : createUserId.trim();
	}

	public Date getLastUpdatedDate() {
		return lastUpdatedDate;
	}

	public void setLastUpdatedDate(Date lastUpdatedDate) {
		this.lastUpdatedDate = lastUpdatedDate;
	}

	public String getLastUpdatedUserId() {
		return lastUpdatedUserId;
	}

	public void setLastUpdatedUserId(String lastUpdatedUserId) {
		this.lastUpdatedUserId = lastUpdatedUserId == null ? null : lastUpdatedUserId.trim();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((createDate == null) ? 0 : createDate.hashCode());
		result = prime * result + ((createUserId == null) ? 0 : createUserId.hashCode());
		result = prime * result + ((description == null) ? 0 : description.hashCode());
		result = prime * result + ((lastUpdatedDate == null) ? 0 : lastUpdatedDate.hashCode());
		result = prime * result + ((lastUpdatedUserId == null) ? 0 : lastUpdatedUserId.hashCode());
		result = prime * result + ((roleGroupId == null) ? 0 : roleGroupId.hashCode());
		result = prime * result + ((roleGroupName == null) ? 0 : roleGroupName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		RoleGroups other = (RoleGroups) obj;
		if (createDate == null) {
			if (other.createDate != null)
				return false;
		} else if (!createDate.equals( other.createDate ))
			return false;
		if (createUserId == null) {
			if (other.createUserId != null)
				return false;
		} else if (!createUserId.equals( other.createUserId ))
			return false;
		if (description == null) {
			if (other.description != null)
				return false;
		} else if (!description.equals( other.description ))
			return false;
		if (lastUpdatedDate == null) {
			if (other.lastUpdatedDate != null)
				return false;
		} else if (!lastUpdatedDate.equals( other.lastUpdatedDate ))
			return false;
		if (lastUpdatedUserId == null) {
			if (other.lastUpdatedUserId != null)
				return false;
		} else if (!lastUpdatedUserId.equals( other.lastUpdatedUserId ))
			return false;
		if (roleGroupId == null) {
			if (other.roleGroupId != null)
				return false;
		} else if (!roleGroupId.equals( other.roleGroupId ))
			return false;
		if (roleGroupName == null) {
			if (other.roleGroupName != null)
				return false;
		} else if (!roleGroupName.equals( other.roleGroupName ))
			return false;
		return true;
	}

	public RoleGroups() {
		super();
	}

	public RoleGroups(String roleGroupId, String roleGroupName, String description, Date createDate, String createUserId, Date lastUpdatedDate,
			String lastUpdatedUserId) {
		super();
		this.roleGroupId = roleGroupId;
		this.roleGroupName = roleGroupName;
		this.description = description;
		this.createDate = createDate;
		this.createUserId = createUserId;
		this.lastUpdatedDate = lastUpdatedDate;
		this.lastUpdatedUserId = lastUpdatedUserId;
	}

	@Override
	public String toString() {
		return "RoleGroups [roleGroupId=" + roleGroupId + ", roleGroupName=" + roleGroupName + ", description=" + description + ", createDate="
				+ createDate + ", createUserId=" + createUserId + ", lastUpdatedDate=" + lastUpdatedDate + ", lastUpdatedUserId=" + lastUpdatedUserId
				+ "]";
	}
}